#include <common/imagedebug.h>
#ifdef CXVISIONIMAGE
#include "backimagemanager.h"
#endif

ImageDebug::ImageDebug()
{

}
void ImageDebug::GetGImage()
{
#ifdef CXVISIONIMAGE

    int icurmodule = BackImageManager::GetCurMode();
    g_pdebugimage = BackImageManager::GetBackObjectImage(icurmodule);
#endif
}
ImageDebug::~ImageDebug()
{
}
void ImageDebug::Clear(int ix,int iy,int iw,int ih)
{
#ifdef CXVISIONIMAGE

    if(nullptr!=g_pdebugimage)
    {
        g_pdebugimage->SetROI(ix,iy,iw,ih);
        g_pdebugimage->ROIImageClear(0);
    }
#endif
}
void ImageDebug::SetImage(int ix ,int iy ,const QColor &color)
{
#ifdef CXVISIONIMAGE

    if(nullptr!=g_pdebugimage)
    {
        g_pdebugimage->setPixelColor( ix,  iy, color);
    }
#endif
}


